<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DAOResource
 *
 * @author Anh
 */
class DAOResource {
    private $username = "root";
    private $password = "123456";
    private $hostname = "localhost";
    private $databaseName = "rating";
    private $connection;
    
    function getConnection() {
        $this->initConnection();
        return $this->connection;
    }

    function initConnection(){
        $this->connection = mysql_connect($this->hostname,$this->username,$this->password);
      if(empty ($this->connection))
         die("mysql connect failed"). mysql_error();
      
    }
}

?>
